<html>
<head><meta charset="utf-8"><title>random · t-cargo/PubGrub · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/index.html">t-cargo/PubGrub</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html">random</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="217615055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/217615055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#217615055">(Nov 23 2020 at 11:10)</a>:</h4>
<p><a href="/user_uploads/4715/GAGppT1TOTztz_1e4RJfCzqP/image.png">image.png</a> </p>
<div class="message_inline_image"><a href="/user_uploads/4715/GAGppT1TOTztz_1e4RJfCzqP/image.png" title="image.png"><img src="/user_uploads/4715/GAGppT1TOTztz_1e4RJfCzqP/image.png"></a></div><p>Is it normal if I feel like I need to improve the package manager of my distrib? (just kidding)</p>



<a name="217615411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/217615411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Tokarev <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#217615411">(Nov 23 2020 at 11:14)</a>:</h4>
<p>I use Arch btw <span aria-label="sunglasses" class="emoji emoji-1f60e" role="img" title="sunglasses">:sunglasses:</span></p>



<a name="218106550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218106550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218106550">(Nov 27 2020 at 16:01)</a>:</h4>
<p>Hey I'm trying to make some rust code compile for my work, but can't figure out how to deal with the lifetimes. I've done a minimal playground example with the same computation flow: <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=abc1720627025aea6245fccebdb90a9c">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=abc1720627025aea6245fccebdb90a9c</a></p>



<a name="218106641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218106641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218106641">(Nov 27 2020 at 16:02)</a>:</h4>
<p>In case you have time to have a look, any idea on how to fix that lifetime issue?</p>



<a name="218108990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218108990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218108990">(Nov 27 2020 at 16:27)</a>:</h4>
<p>Alternative version with generics instead of box, but does not compile either ^^: <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=2ab0302c665221fb907d6f0f000c4041">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=2ab0302c665221fb907d6f0f000c4041</a></p>



<a name="218109273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218109273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218109273">(Nov 27 2020 at 16:30)</a>:</h4>
<p>Trying to figure out what is important and what is the example.<br>
You want <code>F</code> to borrow from self and be stored in self?</p>



<a name="218109625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218109625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218109625">(Nov 27 2020 at 16:34)</a>:</h4>
<p><code>full</code> is a utility function, which depends on a many things. Inside the <code>update</code> I'm only interested by  the <code>partial</code> signature. Ideally I'd like it to be a closure depending on values inside the <code>State</code>. So yes, in theory <code>F</code> should not escape self</p>



<a name="218109861"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218109861" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218109861">(Nov 27 2020 at 16:36)</a>:</h4>
<p>The thing is that the update modifies <code>self</code> and thus I'd need to update the <code>partial</code> closure to reflect that</p>



<a name="218109868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218109868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218109868">(Nov 27 2020 at 16:36)</a>:</h4>
<p>I don't think this can work  as there is nothing stopping you from adding this method</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">    </span><span class="k">fn</span> <span class="nf">invalidate_pointer</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"diffrent"</span><span class="p">.</span><span class="n">to_string</span><span class="p">();</span><span class="w"></span>
<span class="w">        </span><span class="c1">// Note how self.partial is still using a</span>
<span class="w">        </span><span class="c1">// &amp;str that pintes into freead memory</span>
<span class="w">       </span><span class="bp">self</span><span class="p">.</span><span class="n">partial</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="218109939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218109939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218109939">(Nov 27 2020 at 16:37)</a>:</h4>
<p>hum</p>



<a name="218110191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218110191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218110191">(Nov 27 2020 at 16:39)</a>:</h4>
<p>which workarounds make sense depends on why you want this structure.</p>



<a name="218110266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218110266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218110266">(Nov 27 2020 at 16:40)</a>:</h4>
<p>makes sense</p>



<a name="218110315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218110315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218110315">(Nov 27 2020 at 16:40)</a>:</h4>
<p>I want to be able to switch different <code>full</code> functions with different parameter types</p>



<a name="218110374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218110374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218110374">(Nov 27 2020 at 16:41)</a>:</h4>
<p>And inside the <code>update</code> only use the <code>usize -&gt; String</code> part of the signature</p>



<a name="218110496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218110496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218110496">(Nov 27 2020 at 16:42)</a>:</h4>
<p>I also need that <code>partial</code> function to be updated since it depends on values changing in the update usually.</p>



<a name="218110517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218110517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218110517">(Nov 27 2020 at 16:43)</a>:</h4>
<p>One solution is to use a <code>RC&lt;String&gt;</code> So it won't be freed until both have changed. If the ref counting and cache miss is not perf critical.</p>



<a name="218110636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218110636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218110636">(Nov 27 2020 at 16:44)</a>:</h4>
<p>I'm making an example with <code>String</code> but basically those are images so big objects and I don't think <code>Rc</code> would matter</p>



<a name="218110698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218110698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218110698">(Nov 27 2020 at 16:45)</a>:</h4>
<p>Or have data be a <code>&amp;'a ___</code> so it can guaranteed to live langer then the struct.</p>



<a name="218110846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218110846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218110846">(Nov 27 2020 at 16:46)</a>:</h4>
<p>That may not be possible since some of that data is computed within the update loop, thus owned by the State</p>



<a name="218110889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218110889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218110889">(Nov 27 2020 at 16:47)</a>:</h4>
<blockquote>
<p>One solution is to use a RC&lt;String&gt;</p>
</blockquote>
<p>Ok, will try</p>



<a name="218110930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218110930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218110930">(Nov 27 2020 at 16:47)</a>:</h4>
<p>It took me awhile to realize that all my python vars have tipe <code>Rc&lt;RefCell&lt;T&gt;&gt;</code> and it never bothered me then. So if it is not per critical and it make the code ezere to read, an <code>RC</code>is not bad.</p>



<a name="218111161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218111161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218111161">(Nov 27 2020 at 16:50)</a>:</h4>
<p>Does not seem to make the trick :( <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=8b36ef03b7e5dd44144803b7c9103ff0">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=8b36ef03b7e5dd44144803b7c9103ff0</a><br>
or maybe I've still something wrong</p>



<a name="218111379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218111379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218111379">(Nov 27 2020 at 16:53)</a>:</h4>
<p><a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=23295052051c77a3181a7da9bf70bb20">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=23295052051c77a3181a7da9bf70bb20</a></p>



<a name="218111645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218111645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218111645">(Nov 27 2020 at 16:56)</a>:</h4>
<p>Ah thank you! So I basically need to Rc all the parameters of my <code>full</code> function and use <code>move</code> for the closure</p>



<a name="218111944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218111944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218111944">(Nov 27 2020 at 16:59)</a>:</h4>
<p>Yes, you want the closure to own the variables it references (so <code>move</code>) but share the ownership with the struct (so <code>Rc</code>).</p>



<a name="218112149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218112149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218112149">(Nov 27 2020 at 17:01)</a>:</h4>
<p>and the bad method from before becomes:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">    </span><span class="k">fn</span> <span class="nf">invalidate_pointer</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Rc</span>::<span class="n">new</span><span class="p">(</span><span class="s">"diffrent"</span><span class="p">.</span><span class="n">to_string</span><span class="p">());</span><span class="w"></span>
<span class="w">        </span><span class="c1">// Note how self.partial has not been updated so is still using</span>
<span class="w">       </span><span class="c1">// the old string, which may be a bug, but it is not UB.</span>
<span class="w">       </span><span class="bp">self</span><span class="p">.</span><span class="n">partial</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="218957781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218957781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218957781">(Dec 05 2020 at 22:54)</a>:</h4>
<p>I've made some progress with the dependency provider for elm but I'm stuck with a compilation error :( <a href="https://github.com/mpizenberg/elm_dependency_provider/blob/master/examples/solve_pkg_deps.rs#L19">https://github.com/mpizenberg/elm_dependency_provider/blob/master/examples/solve_pkg_deps.rs#L19</a></p>
<p>With the offline provider it works smoothly, but with the online one <code>resolve</code> says it does not implement <code>DependencyProvider</code>, I'm not figuring it out</p>



<a name="218957794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218957794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218957794">(Dec 05 2020 at 22:55)</a>:</h4>
<p>If one of you have some time checking it out, let me know if you find the issue</p>



<a name="218960747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/218960747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#218960747">(Dec 06 2020 at 00:20)</a>:</h4>
<p><code>ElmPackageProviderOnline::new</code> returns a result.</p>



<a name="219505687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/219505687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#219505687">(Dec 10 2020 at 17:28)</a>:</h4>
<p>I'm having a weird compilation issue, related to musl. If I compile this binary <a href="https://github.com/mpizenberg/elm-test-rs">https://github.com/mpizenberg/elm-test-rs</a> with <code>cargo build --release --target x86_64-unknown-linux-musl</code> Cargo tells me this:</p>
<div class="codehilite"><pre><span></span><code>  running: &quot;musl-g++&quot; &quot;-O3&quot; &quot;-ffunction-sections&quot; &quot;-fdata-sections&quot; &quot;-fPIC&quot; &quot;-m64&quot; &quot;-I&quot; &quot;src&quot; &quot;-Wall&quot; &quot;-Wextra&quot; &quot;-o&quot; &quot;/home/matthieu/git/mpizenberg/elm-test-rs_musl/target/x86_64-unknown-linux-musl/release/build/tree-sitter-elm-9d31565a479bf4e7/out/src/scanner.o&quot; &quot;-c&quot; &quot;src/scanner.cc&quot;

  --- stderr

  error occurred: Failed to find tool. Is `musl-g++` installed?
</code></pre></div>



<a name="219505938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/219505938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#219505938">(Dec 10 2020 at 17:30)</a>:</h4>
<p>And it is right that <code>musl-g++</code> does not exist, even though I've installed <code>community/musl</code> and <code>community/kernel-headers-musl</code> packages on my archlinux system. They don't seem to contain a <code>musl-g++</code> binary, only <code>musl-gcc</code>.</p>



<a name="219507492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/219507492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#219507492">(Dec 10 2020 at 17:40)</a>:</h4>
<p>Sorry don't know about musl</p>



<a name="221867005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/221867005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#221867005">(Jan 07 2021 at 08:21)</a>:</h4>
<p>This might be relevant? (don't know I haven't understood in details what this is) <a href="https://github.com/rust-lang/cargo/issues/8088">https://github.com/rust-lang/cargo/issues/8088</a> "Features 2.0 meta tracking issue"</p>



<a name="221951842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/221951842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#221951842">(Jan 07 2021 at 15:03)</a>:</h4>
<p>It is really cool and good work. It adds a second pass over the resolution graph ( after the resolver ) that reduces <code>features</code>and optional dependencies that are not needed for the exact build that is happening. Pubgrub does not need to handle this step itself in order to be useful in Cargo. There will always need to be a separate pass. For example the lock file needs to know if your dependencies are incompatible on windows even if you are currently building on linux. But it may be an interesting stretch goal to try and incorporate it into a Pubgrub-based resolver, so that it can allow conflicting versions as long as there is no system that will require them both.</p>



<a name="225157859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/225157859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#225157859">(Feb 04 2021 at 13:23)</a>:</h4>
<p>I'm currently working on some web stuff for work and I'm wondering how I could retrieve the stderr output of some rust wasm and put it in a dedicated panel of the web gui. This seems rather not possible. But I've seen the <a href="https://crates.io/crates/log">log crate</a> that could be somewhat useful I guess. And it seems like something that could be useful to pugrub too (the logging). Have you used the crate already? is it good/bad practice?</p>



<a name="225162131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/225162131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#225162131">(Feb 04 2021 at 13:58)</a>:</h4>
<p>I have used the <a href="https://github.com/rust-lang/cargo/blob/master/Cargo.toml#L46">log</a> crate in general. It is widely used and very nice.<br>
I think there are adapters to use it in wasm, but I don't recall trying them.</p>



<a name="226420125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/226420125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#226420125">(Feb 15 2021 at 19:05)</a>:</h4>
<p>I've tried the log crate and like it! thanks for confirming it's wide adoption!</p>



<a name="226420272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/226420272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#226420272">(Feb 15 2021 at 19:06)</a>:</h4>
<p>Also sorry I've been underwater with finishing version 1.0.0 of elm-test-rs (just released 1.0.0-beta this weekend) + some things I needed to do for the exercism project, so couldn't find time to review your arena PR <span class="user-mention" data-user-id="120179">@Eh2406</span></p>



<a name="226420778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/226420778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#226420778">(Feb 15 2021 at 19:12)</a>:</h4>
<p>No rush! I am working on simplifying the code around <code>find_satisfier_and_previous_satisfier_level</code>next. Mostly so I can understand it better.</p>



<a name="226421222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/226421222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#226421222">(Feb 15 2021 at 19:16)</a>:</h4>
<p>I think I explained a bit the backtracking logic in that part of the guide: <a href="https://pubgrub-rs-guide.netlify.app/internals/conflict_resolution.html">https://pubgrub-rs-guide.netlify.app/internals/conflict_resolution.html</a> Don't hesitate to have a look at it while working on that</p>



<a name="226421594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/226421594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#226421594">(Feb 15 2021 at 19:20)</a>:</h4>
<p>I will definitely reread that and <a href="https://github.com/mpizenberg/pubgrub-rs/issues/57">pubgrub#57</a> when I have simplified the code.</p>



<a name="226421862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/226421862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#226421862">(Feb 15 2021 at 19:23)</a>:</h4>
<p>So far I am not making big structure/algorithmic changes. Just some return type and order of operation changes.</p>



<a name="226422350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/226422350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#226422350">(Feb 15 2021 at 19:29)</a>:</h4>
<p>By the way, one way of improving this in complexity would be to turn that search into a O(M) instead of O(N) where N is the total number of assignment while M is the number of assign related to that conflict (with package terms appearing in the conflict). That could be done by changing the data structure used to search those satisfiers. But it would be quite a big architectural change, and would require using a hashmap of some sort that would have impact to other things in the profile of the algorithm as a whole. But I wanted to mention that since it would be linked to a different approach for storing the partial solution.</p>



<a name="226422522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/226422522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#226422522">(Feb 15 2021 at 19:31)</a>:</h4>
<p>Yes, indeed! That is one of the things I was thinking of heading towards, not this PR but over the next few PRs.</p>



<a name="227890791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/227890791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#227890791">(Feb 26 2021 at 07:15)</a>:</h4>
<p>Hey, I finally fixed all the hairy stuff and weird windows bug I wanted to fix for elm-test-rs. I didn't thought I'd encounter so many problems last weekend. So I'll have a look at the arena PR tonight. I agree having to rebase on long architecture changes would be annoying.</p>



<a name="234681047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/234681047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#234681047">(Apr 15 2021 at 14:03)</a>:</h4>
<p>Small random note. Today I needed to load an image in wasm but I was getting stuck with an error message saying rayon cannot be used, even though I had only added the feature <code>jpeg</code> and not <code>jpeg/rayon</code> in my dependencies</p>



<a name="234681351"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/234681351" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#234681351">(Apr 15 2021 at 14:05)</a>:</h4>
<p>Turns out, this was because my <code>lowrr-wasm</code> crate was in the same workspace that my <code>lowrr-lib</code> crate, which depends on the image crate with the default features. So the resolver compiled my wasm lib also with default features.</p>



<a name="242275465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/242275465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#242275465">(Jun 10 2021 at 21:45)</a>:</h4>
<p>Today I saw a new release of anyhow due to a dependency problem (cf issue <a href="https://github.com/dtolnay/anyhow/pull/155">https://github.com/dtolnay/anyhow/pull/155</a>). I hope once PubGrub is advanced enough, solving dependencies with minimal versions will be easy and efficient enough that a simple option could be added to <code>cargo test</code> like <code>--minimal-versions</code> so that people add this to their CI.</p>



<a name="242346604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/242346604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#242346604">(Jun 11 2021 at 13:44)</a>:</h4>
<p>It exists. <a href="https://doc.rust-lang.org/cargo/reference/unstable.html#minimal-versions">https://doc.rust-lang.org/cargo/reference/unstable.html#minimal-versions</a> . It is a global check, it will also fail if any transitive dep is not right. Meany projects don't think it is a problem. Anything that depend on them cant use it. So we are going to need a more local tool.</p>
<p>Also sorry for disappearing this week. My benchmarking computer is having an issue, and I got distracted. I will come back.</p>



<a name="244078047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244078047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244078047">(Jun 27 2021 at 18:09)</a>:</h4>
<p>Hey, just to let you know I might not answer on github during approximately 3 weeks, except maybe for the 0.2.1 release and to write a little post about it on reddit. Otherwise, I'll occasionally read but not do any concrete progress for the upcoming month, roughly.</p>



<a name="244078114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244078114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244078114">(Jun 27 2021 at 18:11)</a>:</h4>
<p>Nothing important, it's just that I'll be on holiday starting 1st of July and won't be on my computer much.</p>



<a name="244078174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244078174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244078174">(Jun 27 2021 at 18:12)</a>:</h4>
<p>Enjoy your holiday!</p>



<a name="244078379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244078379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244078379">(Jun 27 2021 at 18:16)</a>:</h4>
<p>I am giving up on a replacement fan showing up, and trying to figure out how to make the gpu fans (witch are right there) run all the time.</p>



<a name="244078454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244078454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244078454">(Jun 27 2021 at 18:18)</a>:</h4>
<p>Hopefully, I can get back to "full <a href="http://cratis.io">cratis.io</a> generation" timings for various branches.</p>



<a name="244078529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244078529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244078529">(Jun 27 2021 at 18:20)</a>:</h4>
<div class="message_inline_image"><a href="https://media0.giphy.com/media/RJVyvWomrVuVRXThoM/giphy-downsized-medium.gif?cid=c623cb35jazduvbx4vos86y2nwykwmm1zjitb49q581s1v65&amp;rid=giphy-downsized-medium.gif&amp;ct=g"><img src="https://uploads.zulipusercontent.net/c32414056571b9ac097ac50124ff382cf84a1e40/68747470733a2f2f6d65646961302e67697068792e636f6d2f6d656469612f524a567976576f6d72567556525854686f4d2f67697068792d646f776e73697a65642d6d656469756d2e6769663f6369643d63363233636233356a617a647576627834766f73383679326e77796b776d6d317a6a6974623439713538317331763635267269643d67697068792d646f776e73697a65642d6d656469756d2e6769662663743d67"></a></div>



<a name="244078839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244078839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244078839">(Jun 27 2021 at 18:27)</a>:</h4>
<p>I was looking for this complete meme when you mentioned repairing your computer but unfortunately this one is very low res and not complete :(. Here is what I meant to post :) <a href="https://www.youtube.com/watch?v=AbSehcT19u0">https://www.youtube.com/watch?v=AbSehcT19u0</a></p>
<div class="youtube-video message_inline_image"><a data-id="AbSehcT19u0" href="https://www.youtube.com/watch?v=AbSehcT19u0"><img src="https://uploads.zulipusercontent.net/db192e52fc6fcd3fadcc29a68ea454b2d3954fdd/68747470733a2f2f692e7974696d672e636f6d2f76692f41625365686354313975302f64656661756c742e6a7067"></a></div>



<a name="244079787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244079787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244079787">(Jun 27 2021 at 18:52)</a>:</h4>
<p>So last time I ran it, it took ~24h. I am now trying with 0.2.1, I want to see how the new partial_solution changes things.<br>
Then I want to try the priority_queue and some other branches.</p>



<a name="244152786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244152786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244152786">(Jun 28 2021 at 14:28)</a>:</h4>
<p>It took 20h, a ~16% improvement! All the more impressive because our slowest crates are releasing new versions eavry few days.</p>



<a name="244260006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244260006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244260006">(Jun 29 2021 at 10:25)</a>:</h4>
<p>Nice!</p>



<a name="244309401"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244309401" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244309401">(Jun 29 2021 at 16:32)</a>:</h4>
<p>Using <a href="https://github.com/pubgrub-rs/pubgrub/commit/5802cca3ba5a354a4540d83d33508609af6f14e8">https://github.com/pubgrub-rs/pubgrub/commit/5802cca3ba5a354a4540d83d33508609af6f14e8</a> on it's own made things slow down to 22.5h. I don't know if that is mostly because:</p>
<ul>
<li>indexmap has some small overhead.</li>
<li>indexmap has different iter order,  so the dependency provider picked different decision order.</li>
<li>the work that is being skip, is not that slow.<br>
and at 1 day a pop, I don't know that I will be looking to closely.</li>
</ul>



<a name="244369682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244369682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244369682">(Jun 30 2021 at 01:57)</a>:</h4>
<p>Using the priority_queue branch (<a href="https://github.com/pubgrub-rs/pubgrub/commit/80a729cd8d56de51c775fb680cb4f40d829b90de">this to be practice</a>) it ran in ... way to fast ... possible explanations:</p>
<ul>
<li>I there's a bug and the new version, it is getting the wrong answer fast</li>
<li>There was something very slow I was doing in the old code</li>
<li>It really is a 90% improvement</li>
</ul>



<a name="244375133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244375133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244375133">(Jun 30 2021 at 04:01)</a>:</h4>
<p><span class="user-mention" data-user-id="120179">@Eh2406</span> For the purposes of iterating on optimization, would it make sense to grab a snapshot of a subset of the index, something that takes around 20-30 minutes at most, and use that?</p>



<a name="244431692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244431692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244431692">(Jun 30 2021 at 14:29)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120179">Eh2406</span> <a href="#narrow/stream/260232-t-cargo.2FPubGrub/topic/random/near/244152786">said</a>:</p>
<blockquote>
<p>It took 20h, a ~16% improvement! All the more impressive because our slowest crates are releasing new versions every few days.</p>
</blockquote>
<p>I'd really love to see a histogram of the timings distribution if that's something doable (maybe measure total time for a given crate, divided by the number of versions to normalize by solver call) both with 0.2.1 and with the priority_queue branch.<br>
If you make a csv, we can visualize it easily with data voyager for example: <a href="https://vega.github.io/voyager/">https://vega.github.io/voyager/</a></p>



<a name="244432248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244432248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244432248">(Jun 30 2021 at 14:32)</a>:</h4>
<p>I was just going to say, the next step is to re-run with the stats being sent to a csv then we can analyze however we want to.</p>



<a name="244432639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244432639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244432639">(Jun 30 2021 at 14:34)</a>:</h4>
<p>One stat to collect (that I have not so far) is the type of the output from <code>resolve</code>, I.E. did it find a solution. If the two versions find a solution for the same crate/vers, then I will feal better about "I there's a bug and the new version, it is getting the wrong answer fast"</p>



<a name="244433375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244433375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244433375">(Jun 30 2021 at 14:38)</a>:</h4>
<p>I may spend some time on "There was something very slow I was doing in the old code". if there is and I can do the 0.2.1 experiment in say 10h, then collecting the stats will be a lot more pleasant.</p>



<a name="244488767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244488767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244488767">(Jun 30 2021 at 21:13)</a>:</h4>
<p>I've release 0.2.1 and documented what I did in that new PR: <a href="https://github.com/pubgrub-rs/pubgrub/pull/100/files">https://github.com/pubgrub-rs/pubgrub/pull/100/files</a></p>



<a name="244488931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244488931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244488931">(Jun 30 2021 at 21:15)</a>:</h4>
<p>I'll write a small post on reddit, and maybe should update the release notes on github with the summary in the changelog</p>



<a name="244489063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244489063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244489063">(Jun 30 2021 at 21:16)</a>:</h4>
<p>Yay, thank you!</p>



<a name="244490913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244490913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244490913">(Jun 30 2021 at 21:30)</a>:</h4>
<p>Here we go :) <a href="https://www.reddit.com/r/rust/comments/ob721q/announcing_version_021_of_pubgrub_a_dependency/">https://www.reddit.com/r/rust/comments/ob721q/announcing_version_021_of_pubgrub_a_dependency/</a></p>



<a name="244491186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244491186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244491186">(Jun 30 2021 at 21:33)</a>:</h4>
<p>Nicely written!</p>



<a name="244643469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244643469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244643469">(Jul 02 2021 at 00:19)</a>:</h4>
<p>Here is the results. <a href="/user_uploads/4715/18PQazF4n-Z5-tMnke4iigNI/out_que.zip">out_que.zip</a> <br>
No attempt to speed things up, just ran it and collected the output.</p>



<a name="244653250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244653250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244653250">(Jul 02 2021 at 02:20)</a>:</h4>
<p><a href="/user_uploads/4715/GBPGtdklLjlyBincDgZGObv0/scatter.png">scatter.png</a> <br>
Less correlation in time then I was expecting.</p>
<div class="message_inline_image"><a href="/user_uploads/4715/GBPGtdklLjlyBincDgZGObv0/scatter.png" title="scatter.png"><img src="/user_uploads/4715/GBPGtdklLjlyBincDgZGObv0/scatter.png"></a></div>



<a name="244653273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244653273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244653273">(Jul 02 2021 at 02:21)</a>:</h4>
<p><a href="/user_uploads/4715/0Jhi97jor7uNNpoxu40y57rU/image.png">image.png</a> <br>
But there are some times where they get a different outcome.</p>
<div class="message_inline_image"><a href="/user_uploads/4715/0Jhi97jor7uNNpoxu40y57rU/image.png" title="image.png"><img src="/user_uploads/4715/0Jhi97jor7uNNpoxu40y57rU/image.png"></a></div>



<a name="244653508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244653508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244653508">(Jul 02 2021 at 02:26)</a>:</h4>
<p>The problematic cases: <br>
name    ver time_que_s  succeeded_que   time    succeeded<br>
spongedown  0.4.0   0.01    true    0   false<br>
spongedown  0.4.1   0.01    true    0   false<br>
spongedown  0.4.2   0.01    true    0   false<br>
oni_simulator   0.1.0   0   false   0   true<br>
tinki   0.1.0   0.03    true    0.01    false<br>
slotmap 0.2.1   0   false   0.01    true<br>
slotmap 0.4.0   0   false   0.01    true<br>
slotmap 1.0.3   0   false   0.01    true<br>
oni_simulator   0.1.2   0   false   0.01    true<br>
slotmap 1.0.1   0   false   0.02    true<br>
slotmap 1.0.2   0   false   0.02    true</p>



<a name="244707846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244707846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244707846">(Jul 02 2021 at 14:11)</a>:</h4>
<p>To check if the differences are  new versions being published or yanked, I need to change the code to look at a unchanging snapshot of the index.</p>



<a name="244831514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244831514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244831514">(Jul 04 2021 at 00:19)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120179">Eh2406</span> <a href="#narrow/stream/260232-t-cargo.2FPubGrub/topic/random/near/244643469">said</a>:</p>
<blockquote>
<p>Here is the results. <a href="/user_uploads/4715/18PQazF4n-Z5-tMnke4iigNI/out_que.zip">out_que.zip</a> <br>
No attempt to speed things up, just ran it and collected the output.</p>
</blockquote>
<p>Awesome, It's weird indeed that there are differences</p>



<a name="244831572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244831572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244831572">(Jul 04 2021 at 00:20)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120179">Eh2406</span> <a href="#narrow/stream/260232-t-cargo.2FPubGrub/topic/random/near/244653250">said</a>:</p>
<blockquote>
<p><a href="/user_uploads/4715/GBPGtdklLjlyBincDgZGObv0/scatter.png">scatter.png</a> <br>
Less correlation in time then I was expecting.</p>
</blockquote>
<p>Do we see things better for all the small timings if we use a logarithmic scale on both axes?</p>



<a name="244831818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244831818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244831818">(Jul 04 2021 at 00:29)</a>:</h4>
<p><a href="/user_uploads/4715/m0v_9ZD7Qv0k_a1Xy6Suo_95/out.zip">out.zip</a> <br>
Here is the joined data. Dig in as you wish!</p>



<a name="244831902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244831902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244831902">(Jul 04 2021 at 00:31)</a>:</h4>
<p>I did find a way to speed up the 0.2.1 based run from 22 -&gt; 8.6</p>



<a name="244832022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244832022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244832022">(Jul 04 2021 at 00:35)</a>:</h4>
<p>Code before:</p>
<div class="codehilite"><pre><span></span><code>    fn choose_package_version&lt;
        T: std::borrow::Borrow&lt;Intern&lt;Names&gt;&gt;,
        U: std::borrow::Borrow&lt;Range&lt;Semantic&gt;&gt;,
    &gt;(
        &amp;self,
        potential_packages: impl Iterator&lt;Item = (T, U)&gt;,
    ) -&gt; Result&lt;(T, Option&lt;Semantic&gt;), Box&lt;dyn Error&gt;&gt; {
        Ok(choose_package_with_fewest_versions(
            |p| match &amp;**p {
                Names::Links(name) =&gt; Either::Left(
                    (0..self.links.borrow().get(name).cloned().unwrap_or(0))
                        .map(|i| Semantic::new(&amp;format!(&quot;{}.0.0&quot;, i)).unwrap()),
                ),
                Names::Wide(_, req, _, _) | Names::WideFeatures(_, req, _, _, _) =&gt; {
                    Either::Right(Either::Left(
                        // one version for each bucket that match req
                        self.get_versions(p.crate_())
                            .into_iter()
                            .filter(|v| req.matches(&amp;v.semver))
                            .map(|v| SemverCompatibility::from(v))
                            .collect::&lt;std::collections::BTreeSet&lt;_&gt;&gt;()
                            .into_iter()
                            .rev()
                            .map(|v| Semantic::from(&amp;v)),
                    ))
                }
                _ =&gt; Either::Right(Either::Right(
                    self.get_versions(p.crate_()).into_iter().cloned(),
                )),
            },
            potential_packages,
        ))
    }
</code></pre></div>
<p>code affter:</p>
<div class="codehilite"><pre><span></span><code>    fn choose_package_version&lt;
        T: std::borrow::Borrow&lt;Intern&lt;Names&gt;&gt;,
        U: std::borrow::Borrow&lt;Range&lt;Semantic&gt;&gt;,
    &gt;(
        &amp;self,
        potential_packages: impl Iterator&lt;Item = (T, U)&gt;,
    ) -&gt; Result&lt;(T, Option&lt;Semantic&gt;), Box&lt;dyn Error&gt;&gt; {
        let out = {
            let (pkg, range) = potential_packages
                .min_by_key(|(p, range): &amp;(T, U)| {
                    match &amp;**p.borrow() {
                        Names::Links(name) =&gt; {
                            (0..self.links.borrow().get(name).cloned().unwrap_or(0))
                                .map(|i| Semantic::new(&amp;format!(&quot;{}.0.0&quot;, i)).unwrap())
                                .filter(|v| range.borrow().contains(v))
                                .count()
                        }

                        Names::Wide(_, req, _, _) | Names::WideFeatures(_, req, _, _, _) =&gt; {
                            // one version for each bucket that match req
                            self.get_versions(p.borrow().crate_())
                                .into_iter()
                                .filter(|v| req.matches(&amp;v.semver))
                                .map(|v| SemverCompatibility::from(v))
                                .collect::&lt;std::collections::BTreeSet&lt;_&gt;&gt;()
                                .into_iter()
                                .map(|v| Semantic::from(&amp;v))
                                .filter(|v| range.borrow().contains(v))
                                .count()
                        }
                        _ =&gt; self
                            .get_versions(p.borrow().crate_())
                            .into_iter()
                            .filter(|v| range.borrow().contains(v))
                            .count(),
                    }
                })
                .expect(&quot;potential_packages gave us an empty iterator&quot;);
            let version = match &amp;**pkg.borrow() {
                Names::Links(name) =&gt; (0..self.links.borrow().get(name).cloned().unwrap_or(0))
                    .map(|i| Semantic::new(&amp;format!(&quot;{}.0.0&quot;, i)).unwrap())
                    .find(|v| range.borrow().contains(v)),

                Names::Wide(_, req, _, _) | Names::WideFeatures(_, req, _, _, _) =&gt; {
                    // one version for each bucket that match req
                    self.get_versions(pkg.borrow().crate_())
                        .into_iter()
                        .filter(|v| req.matches(&amp;v.semver))
                        .map(|v| SemverCompatibility::from(v))
                        .collect::&lt;std::collections::BTreeSet&lt;_&gt;&gt;()
                        .into_iter()
                        .rev()
                        .map(|v| Semantic::from(&amp;v))
                        .find(|v| range.borrow().contains(v))
                }
                _ =&gt; self
                    .get_versions(pkg.borrow().crate_())
                    .into_iter()
                    .find(|v| range.borrow().contains(v))
                    .cloned(),
            };
            (pkg, version)
        };
        Ok(out)
    }
</code></pre></div>
<p>Not enterally shuoor why.</p>



<a name="244862936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244862936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244862936">(Jul 04 2021 at 14:53)</a>:</h4>
<p>So looking at that code, there are a lot of ways to make things faster:</p>
<ul>
<li>we don't need a <code>BTreeSet</code> to dedup a sorted iterator</li>
<li>the new Semver 1.0 does a lot less allocations</li>
<li>Semver 1.0 has many more public fields, so <code>Semantic::new(&amp;format!("{}.0.0", i)).unwrap()</code> can be done without an allocation</li>
</ul>
<p>This will make both versions a lot faster.</p>



<a name="244863322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244863322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244863322">(Jul 04 2021 at 15:01)</a>:</h4>
<p>So we are now at 21,648s for 0.2.1 and 4,542s for Que. (yes that is 1 hour 16 minutes)</p>



<a name="244863696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244863696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244863696">(Jul 04 2021 at 15:08)</a>:</h4>
<p><a href="/user_uploads/4715/Rg42Ihe8HkTQNgTnPHafrGFS/out.zip">out.zip</a> the joined data, comfortingly they always get the same pass/fail!</p>



<a name="244884259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244884259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244884259">(Jul 05 2021 at 00:21)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120179">Eh2406</span> <a href="#narrow/stream/260232-t-cargo.2FPubGrub/topic/random/near/244863322">said</a>:</p>
<blockquote>
<p>So we are now at 21,648s for 0.2.1 and 4,542s for Que. (yes that is 1 hour 16 minutes)</p>
</blockquote>
<p>wow! such a long time just for one package!</p>



<a name="244884731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244884731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244884731">(Jul 05 2021 at 00:34)</a>:</h4>
<p>Sorry, no, that's all versions of all packages.</p>



<a name="244884744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/244884744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#244884744">(Jul 05 2021 at 00:35)</a>:</h4>
<p>One is based on the 0.2.1 branch of Pub grub. The other one is the priority queue branch.</p>



<a name="246389442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/246389442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#246389442">(Jul 18 2021 at 17:31)</a>:</h4>
<p><span class="user-mention" data-user-id="120179">@Eh2406</span> I'd love if we could make a call some day in the coming weeks when you are free. So that we can talk about our recent experiments (intervals, priority queues, pre-release for cargo etc.). Let me know if that's ok with you and when you can be available. This may have to be on a weekend to accommodate with the time difference. Personally, I'm fairly free until mid august I think</p>



<a name="246389685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/246389685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#246389685">(Jul 18 2021 at 17:37)</a>:</h4>
<p>I would love to!<br>
May not be what you meant, but I am available for the next few hours.<br>
Or we can try to find a time slot that works for both of us!</p>



<a name="246391413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/246391413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#246391413">(Jul 18 2021 at 18:18)</a>:</h4>
<p><span class="user-mention" data-user-id="348419">@Matthieu Pizenberg</span> Looking at a calendar, my weekends are surprisingly booked for the next 5 weeks. But my work schedule is pretty flexible.  I may be able to take an hour or shift things around, for a time that is after work for you.</p>



<a name="246392360"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/246392360" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#246392360">(Jul 18 2021 at 18:43)</a>:</h4>
<p>Can't tonight ^^. An evening for me on a day where you can shift things could work too.</p>



<a name="246392468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/246392468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#246392468">(Jul 18 2021 at 18:45)</a>:</h4>
<p>But if that's a weekend after the summer that's ok for me too. I'm in no hurry and still have plenty of documentation to do meanwhile</p>



<a name="246392552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/246392552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#246392552">(Jul 18 2021 at 18:47)</a>:</h4>
<p>BTW thank you for the documentation! It is very good. I understand this stuff better having read your documentation, even when I came up with it and have implemented it!</p>



<a name="246393164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/246393164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#246393164">(Jul 18 2021 at 19:02)</a>:</h4>
<p>I'm glad you like it <span aria-label="smiling face" class="emoji emoji-263a" role="img" title="smiling face">:smiling_face:</span>️</p>



<a name="247947443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/247947443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#247947443">(Aug 02 2021 at 17:40)</a>:</h4>
<p>We should publicize the new guide, and not weigh for <code>0.2.2</code>. It is too good to not be talking about it!</p>



<a name="248334290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/248334290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#248334290">(Aug 04 2021 at 10:47)</a>:</h4>
<p>I hesitated between a public announcement and just telling it to people concerned by those limitations in github issues. I did the latter because I thought new users will not be aware of the old guide without the new section anyway. But if you think it's worth an announcement, I could prepare something and share it here for review before public share</p>



<a name="248343662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/248343662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#248343662">(Aug 04 2021 at 12:37)</a>:</h4>
<p>draft:</p>
<h1>New section in pugrub guide (dependency solver) about advanced usage and limitations</h1>
<p>PubGrub is an algorithm to solve dependency requirements, and <a href="https://github.com/pubgrub-rs/pubgrub">pubgrub-rs/pubgrub</a> is a Rust implementation of that algorithm.</p>
<p>In November 2020, we released version 0.2 of pubgrub with sound foundations and an API enabling solving dependencies of simple systems. This enabled for example solving package dependencies of the Elm ecosystem for the alternative tests runner <a href="https://github.com/mpizenberg/elm-test-rs">elm-test-rs</a>.</p>
<p>Since then, we focused on performances and released in June this year (2021) version 0.2.1 with speed improvements ranging from 3x to 8x faster resolutions.</p>
<p>During all that time, many people have tried pubgrub and reached the limitations imposed by its current design. Some of these limitations can be circumvented, like enabling optional dependencies, or being able to pick multiple versions of the same package. Some however, run deep within the knowledge mechanisms of the algorithm and cannot be overcome with the current design. This is the case of pre-releases when those are coupled with "impure" requirements. By that we mean requirements that do not follow the mathematical properties of the order of elements in the corresponding sets. For example saying that "1.0 &lt;= v &lt; 3.0" should not contain version 2.0-alpha is problematic.</p>
<p>In order to help pubgrub users, including ourselves, we thus wrote a <a href="https://pubgrub-rs-guide.netlify.app/limitations/intro.html">new section</a> in the pubgrub guide to address this very topic of advanced usage and limitations. We hope that it explains clearly the challenges faced, and that it will help us develop the new APIs to overcome those in future versions of pubgrub.</p>



<a name="248350491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/248350491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#248350491">(Aug 04 2021 at 13:36)</a>:</h4>
<p>I like that! The guide is amazing, the more it gets talked up the better!</p>



<a name="248360450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/248360450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#248360450">(Aug 04 2021 at 14:48)</a>:</h4>
<p>Here we go: <a href="https://www.reddit.com/r/rust/comments/oxu88c/new_section_in_pugrub_guide_dependency_solver/">https://www.reddit.com/r/rust/comments/oxu88c/new_section_in_pugrub_guide_dependency_solver/</a></p>



<a name="248471340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/248471340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#248471340">(Aug 05 2021 at 12:42)</a>:</h4>
<p>I don't know if this is legit, but if it is, there really is conference for everything ^^ <a href="http://packaging-con.org/">http://packaging-con.org/</a></p>



<a name="248471731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/248471731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#248471731">(Aug 05 2021 at 12:46)</a>:</h4>
<p>It does seem interesting, I signed up for their email list.</p>



<a name="248472664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/248472664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#248472664">(Aug 05 2021 at 12:55)</a>:</h4>
<p>Do we want to submit a talk?</p>



<a name="248644130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/248644130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthieu Pizenberg <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#248644130">(Aug 06 2021 at 17:44)</a>:</h4>
<p>could but what would it be? would be nice to have a demo of cargo using pubgrub, but that's a bit far off</p>



<a name="248650988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260232-t-cargo/PubGrub/topic/random/near/248650988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/260232-t-cargo/PubGrub/topic/random.html#248650988">(Aug 06 2021 at 18:37)</a>:</h4>
<p>I think the work you have done on PubGrub as a reusable library is prite cool.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>